﻿using MESTranslateToPLC.Manager;

namespace MESTranslateToPLC.Service.BackgroudService;

public class InitModbusDeviceManager : BackgroundService
{
    private readonly ModbusDeviceManager _modbusDeviceManager;

    public InitModbusDeviceManager(ModbusDeviceManager modbusDeviceManager)
    {
        _modbusDeviceManager = modbusDeviceManager;
    }

    protected async override Task ExecuteAsync(CancellationToken stoppingToken)
    {
        await _modbusDeviceManager.Init();
    }
}